import allRoutes from "./generateRoute"

let homeRoute = allRoutes.find(item=>item.path==='/home')

console.log(allRoutes);
let paymentRoute = homeRoute.children.find(item => item.path === "payment")
let preorderRoute = homeRoute.children.find(item => item.path === "preorder")
// console.log(paymentRoute);
// console.log(preorder);
//目的: 以前访问/home能够访问到布局组件 现在希望访问 / 就能访问到布局组件
// import allRoutes from "./generateRoute"
// let target = allRoutes.find(item=>item.name === 'home')
let dynamicRoute = {
    path:"/",
    // children:[...target.children],
    children:[paymentRoute,preorderRoute],
    component:()=>import(/*webpackChunkName:'layout' */"@/layout/container.vue")
}

export default dynamicRoute